'use strict';
const Sequelize = require('sequelize');
module.exports = {
    // 在执行数据库升级时调用的函数，创建 users 表
    up: async (queryInterface, Sequelize) => {

        const {  STRING  ,INTEGER} = Sequelize;

        await queryInterface.createTable('t_system', {
            id: { type: INTEGER, primaryKey: true, autoIncrement: true },
            d_key: {type:STRING(255),'allowNull': false},
            d_value: {type:STRING(255),'allowNull': false},
        },{
            timestamps: false,  //去除createAt updateAt
            freezeTableName: true,  //使用自定义表名
        });
    },
    // 在执行数据库降级时调用的函数，删除 users 表
    down: async queryInterface => {
        await queryInterface.dropTable('t_system');
    },
};
